﻿using System;
namespace 分解质因数
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入一个整数");
            string s = Console.ReadLine();
            Console.WriteLine(s + "的质因数有：");
            int a = Convert.ToInt32(s);
            int i = 2;
            string ans = "";
            while(a!=1)
            {
                if(a%i==0)
                {
                    while (a % i == 0)
                        a /= i;
                    ans += Convert.ToString(i);
                    ans += ",";
                }
                i++;
            }
            Console.WriteLine(ans);
        }
    }
}
